<template>
    <!-- /查看组内公司组件页面--兑换券/ -->
  <zm-dialog :visible.sync="value" :before-close="close" :show-footer="false" center title="查看组内公司">
    <template v-for="(item,index) in companyGroupList">
      <div :key="index">
        <h3>{{item.groupName}}</h3>
        <div><span>公司名称:&nbsp;</span><span>{{item.groupCompanyNames || '--'}}</span></div>
        <br />
      </div>
    </template>
</zm-dialog>
</template>

<script>
import panelMixin from '@/mixins/panelMixin'
import product from '@/api/src/product'
export default {
  name: 'CheckGroundDialog',
  mixins: [panelMixin],
  data () {
    return {
      companyGroupList: [] // 所属公司分组列表信息
    }
  },
  created () {
    this.init()
  },
  methods: {
    // 初始化函数
    init () {
      this.getCompanyGroupList()
    },
    // 获取所属公司分组
    async getCompanyGroupList () {
      const _res = await product.getGroupCompanyName({groupIds: this.id})
      this.companyGroupList = _res
      console.log(_res)
    },
    close () {
      this.$emit('input', false)
    }
  }
}
</script>

<style>

</style>
